<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ng表达式</title>
<script
	src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</head>
<body>
	<h2>angular表达式</h2>
	<ul>
		<li>表达式写在双大括号内：{{ expression }}</li>
		<li>表达式把数据绑定到 HTML，这与 ng-bind 指令有异曲同工之妙</li>
		<li>将在表达式书写的位置"输出"数据</li>
		<li>很像 JavaScript 表达式：它们可以包含文字、运算符和变量</li>
	</ul>
	<fieldset>
		<legend>angular表达式测试：</legend>
		<div ng-app="" ng-init="name='zh-cn';age=18;person={irstName:'John',lastName:'Doe'};ages=[12,13,15]">
			<span>5+1的值为： {{5+1}}</span><br> <span>{{name+""+age}}</span><br>
			<span>5*2的值为：{{5*2}}</span><br> <span ng-bind=5*2></span>
			<p>
                姓为 <span ng-bind="person.lastName"></span>
            </p>
            <p>
                [12,13,15]的第二个值为：<span ng-bind="ages[1]"></span><br>
                数字ages的值为<span ng-repeat="x in ages">{{x}} &nbsp;</span>
            </p>
		</div>
	</fieldset>
</body>
</html>